﻿using AdverseEventReportSystem.BLL;
using AdverseEventReportSystem.BLL.ServiceReference1;
using AdverseEventReportSystem.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace AdverseEventReportSystem.Web.Areas.Personnel
{
    public class EditNurseTransferController : BaseController
    {
        // GET: Personnel/EditNurseTransfer
        public ActionResult Index(int id = 0, int pageType = 0, int status = 0)
        {
            ViewBag.TransferId = id;
            ViewBag.PageType = pageType;
            ViewBag.Status = status;
            return View();
        }

        /// <summary>
        /// 获取转科申请详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult GetNurseTransferInfo(string id)
        {
            OperateResult resultInfo = NurseTransferManager.GetNurseTransferInfo(id);
            return JsonDate(resultInfo);
        }

        /// <summary>
        /// 添加/编辑转科申请
        /// </summary>
        /// <param name="nurseTransfer"></param>
        /// <returns></returns>
        [HttpPost]
        public ActionResult Save(NurseTransfer nurseTransfer)
        {
            OperateResult resultInfo = NurseTransferManager.Save(nurseTransfer);
            return JsonDate(resultInfo);
        }
    }
}